package cn.dlc.com.exception;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

import java.nio.file.AccessDeniedException;

/**
 * @author 邓立川
 * @date 2021/11/21 11:11
 * @desc 当前类的描述信息
 */
@RestControllerAdvice
public class GlobalExceptionHandler {

    @ExceptionHandler(RuntimeException.class)
    public String handException(RuntimeException e){
        return e.getMessage();
    }
}
